 <?php
	session_start();
	if(!isset($_SESSION['login'])){
		$_SESSION['login']['id'] = '1234';
		$_SESSION['login']['IP'] = $_SERVER[REMOTE_ADDR];
		//$_SESSION['idioma'] = ;
		//$_SESSION['login'][''] = ;
	}
	
	function pany($rols){
		$acceptat  = false;
		$myRols = $_SESSION['rols'];
		$index = 0;
		while(!$acceptat && $index < count($rols)){
			$index2 = 0;
			while(!$acceptat && $index2 < count($myRols)){
				$acceptat = $myRols[$index2] == $rols[$index];
				$index2++;
			}
			$index++;
		}
		return $acceptat;
	}
?>
